﻿using System.Data.Entity;
using System.Linq;
using CH.FourBoards.LagerWalti.Persistence.Entities;

namespace CH.FourBoards.LagerWalti.Persistence.DataAccess.EntityProviders
{
    internal class ProductProvider : EntityProvider<Product>
    {
        public ProductProvider(DataContext context)
            : base(context)
        {
        }

        protected override DbSet<Product> Set
        {
            get { return Context.Products; }
        }

        protected override IQueryable<Product> SetEagerlyLoaded
        {
            get { return Context.Products.Include(p => p.Category); }
        }
    }
}
